<!DOCTYPE html><html lang="zh-CN" data-theme="light"><head><meta charset="UTF-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><title>指尖改变世界 - 科技始终来源于人性</title><meta name="keywords" content="沙屿沫个人博客,沙屿沫,shayvmo,php"><meta name="author" content="沙屿沫"><meta name="copyright" content="沙屿沫"><meta name="format-detection" content="telephone=no"><meta name="theme-color" content="#ffffff"><meta name="description" content="科技始终来源于人性">
<meta property="og:type" content="website">
<meta property="og:title" content="指尖改变世界">
<meta property="og:url" content="http://blog.shayvmo.cn/page/7/index.html">
<meta property="og:site_name" content="指尖改变世界">
<meta property="og:description" content="科技始终来源于人性">
<meta property="og:locale" content="zh_CN">
<meta property="og:image" content="http://blog.shayvmo.cn/images/avatar.jpg">
<meta property="article:author" content="沙屿沫">
<meta property="article:tag" content="沙屿沫个人博客,沙屿沫,shayvmo,php">
<meta name="twitter:card" content="summary">
<meta name="twitter:image" content="http://blog.shayvmo.cn/images/avatar.jpg"><link rel="shortcut icon" href="/images/avatar.jpg"><link rel="canonical" href="http://blog.shayvmo.cn/page/7/"><link rel="preconnect" href="//cdn.jsdelivr.net"/><link rel="preconnect" href="//hm.baidu.com"/><link rel="preconnect" href="//busuanzi.ibruce.info"/><link rel="stylesheet" href="/css/index.css"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free/css/all.min.css" media="print" onload="this.media='all'"><script>var _hmt = _hmt || [];
(function() {
  var hm = document.createElement("script");
  hm.src = "https://hm.baidu.com/hm.js?5e4d1e8fcc524b4e732ea58fa9fa15f0";
  var s = document.getElementsByTagName("script")[0]; 
  s.parentNode.insertBefore(hm, s);
})();
</script><script>const GLOBAL_CONFIG = { 
  root: '/',
  algolia: undefined,
  localSearch: {"path":"search.xml","languages":{"hits_empty":"找不到您查询的内容：${query}"}},
  translate: undefined,
  noticeOutdate: undefined,
  highlight: {"plugin":"highlighjs","highlightCopy":true,"highlightLang":true,"highlightHeightLimit":false},
  copy: {
    success: '复制成功',
    error: '复制错误',
    noSupport: '浏览器不支持'
  },
  relativeDate: {
    homepage: false,
    post: false
  },
  runtime: '天',
  date_suffix: {
    just: '刚刚',
    min: '分钟前',
    hour: '小时前',
    day: '天前',
    month: '个月前'
  },
  copyright: undefined,
  lightbox: 'fancybox',
  Snackbar: undefined,
  source: {
    jQuery: 'https://cdn.jsdelivr.net/npm/jquery@latest/dist/jquery.min.js',
    justifiedGallery: {
      js: 'https://cdn.jsdelivr.net/npm/justifiedGallery/dist/js/jquery.justifiedGallery.min.js',
      css: 'https://cdn.jsdelivr.net/npm/justifiedGallery/dist/css/justifiedGallery.min.css'
    },
    fancybox: {
      js: 'https://cdn.jsdelivr.net/npm/@fancyapps/fancybox@latest/dist/jquery.fancybox.min.js',
      css: 'https://cdn.jsdelivr.net/npm/@fancyapps/fancybox@latest/dist/jquery.fancybox.min.css'
    }
  },
  isPhotoFigcaption: false,
  islazyload: true,
  isanchor: false
}</script><script id="config-diff">var GLOBAL_CONFIG_SITE = {
  title: '指尖改变世界',
  isPost: false,
  isHome: true,
  isHighlightShrink: false,
  isToc: false,
  postUpdate: '2023-06-05 17:19:25'
}</script><noscript><style type="text/css">
  #nav {
    opacity: 1
  }
  .justified-gallery img {
    opacity: 1
  }

  #recent-posts time,
  #post-meta time {
    display: inline !important
  }
</style></noscript><script>(win=>{
    win.saveToLocal = {
      set: function setWithExpiry(key, value, ttl) {
        if (ttl === 0) return
        const now = new Date()
        const expiryDay = ttl * 86400000
        const item = {
          value: value,
          expiry: now.getTime() + expiryDay,
        }
        localStorage.setItem(key, JSON.stringify(item))
      },

      get: function getWithExpiry(key) {
        const itemStr = localStorage.getItem(key)

        if (!itemStr) {
          return undefined
        }
        const item = JSON.parse(itemStr)
        const now = new Date()

        if (now.getTime() > item.expiry) {
          localStorage.removeItem(key)
          return undefined
        }
        return item.value
      }
    }
  
    win.getScript = url => new Promise((resolve, reject) => {
      const script = document.createElement('script')
      script.src = url
      script.async = true
      script.onerror = reject
      script.onload = script.onreadystatechange = function() {
        const loadState = this.readyState
        if (loadState && loadState !== 'loaded' && loadState !== 'complete') return
        script.onload = script.onreadystatechange = null
        resolve()
      }
      document.head.appendChild(script)
    })
  
      win.activateDarkMode = function () {
        document.documentElement.setAttribute('data-theme', 'dark')
        if (document.querySelector('meta[name="theme-color"]') !== null) {
          document.querySelector('meta[name="theme-color"]').setAttribute('content', '#0d0d0d')
        }
      }
      win.activateLightMode = function () {
        document.documentElement.setAttribute('data-theme', 'light')
        if (document.querySelector('meta[name="theme-color"]') !== null) {
          document.querySelector('meta[name="theme-color"]').setAttribute('content', '#ffffff')
        }
      }
      const t = saveToLocal.get('theme')
    
          if (t === 'dark') activateDarkMode()
          else if (t === 'light') activateLightMode()
        
      const asideStatus = saveToLocal.get('aside-status')
      if (asideStatus !== undefined) {
        if (asideStatus === 'hide') {
          document.documentElement.classList.add('hide-aside')
        } else {
          document.documentElement.classList.remove('hide-aside')
        }
      }
    })(window)</script><meta name="generator" content="Hexo 5.4.0"></head><body><div id="sidebar"><div id="menu-mask"></div><div id="sidebar-menus"><div class="author-avatar"><img class="avatar-img" src= "" data-lazy-src="/images/avatar.jpg" onerror="onerror=null;src='/img/friend_404.gif'" alt="avatar"/></div><div class="site-data"><div class="data-item is-center"><div class="data-item-link"><a href="/archives/"><div class="headline">文章</div><div class="length-num">74</div></a></div></div><div class="data-item is-center"><div class="data-item-link"><a href="/tags/"><div class="headline">标签</div><div class="length-num">42</div></a></div></div><div class="data-item is-center"><div class="data-item-link"><a href="/categories/"><div class="headline">分类</div><div class="length-num">15</div></a></div></div></div><hr/><div class="menus_items"><div class="menus_item"><a class="site-page" href="/"><i class="fa-fw fas fa-home"></i><span> 首页</span></a></div><div class="menus_item"><a class="site-page" href="/archives/"><i class="fa-fw fas fa-archive"></i><span> 时间轴</span></a></div><div class="menus_item"><a class="site-page" href="/tags/"><i class="fa-fw fas fa-tags"></i><span> 标签</span></a></div><div class="menus_item"><a class="site-page" href="/categories/"><i class="fa-fw fas fa-folder-open"></i><span> 分类</span></a></div><div class="menus_item"><a class="site-page" href="/link/"><i class="fa-fw fas fa-link"></i><span> 友情链接</span></a></div><div class="menus_item"><a class="site-page" href="/about/"><i class="fa-fw fas fa-heart"></i><span> 关于</span></a></div></div></div></div><div class="page" id="body-wrap"><header class="full_page" id="page-header" style="background-image: url('/images/bg/kobe.jpg')"><nav id="nav"><span id="blog_name"><a id="site-name" href="/">指尖改变世界</a></span><div id="menus"><div id="search-button"><a class="site-page social-icon search"><i class="fas fa-search fa-fw"></i><span> 搜索</span></a></div><div class="menus_items"><div class="menus_item"><a class="site-page" href="/"><i class="fa-fw fas fa-home"></i><span> 首页</span></a></div><div class="menus_item"><a class="site-page" href="/archives/"><i class="fa-fw fas fa-archive"></i><span> 时间轴</span></a></div><div class="menus_item"><a class="site-page" href="/tags/"><i class="fa-fw fas fa-tags"></i><span> 标签</span></a></div><div class="menus_item"><a class="site-page" href="/categories/"><i class="fa-fw fas fa-folder-open"></i><span> 分类</span></a></div><div class="menus_item"><a class="site-page" href="/link/"><i class="fa-fw fas fa-link"></i><span> 友情链接</span></a></div><div class="menus_item"><a class="site-page" href="/about/"><i class="fa-fw fas fa-heart"></i><span> 关于</span></a></div></div><div id="toggle-menu"><a class="site-page"><i class="fas fa-bars fa-fw"></i></a></div></div></nav><div id="site-info"><h1 id="site-title">指尖改变世界</h1><div id="site-subtitle"><span id="subtitle"></span></div></div><div id="scroll-down"><i class="fas fa-angle-down scroll-down-effects"></i></div></header><main class="layout" id="content-inner"><div class="recent-posts" id="recent-posts"><div class="recent-post-item"><div class="post_cover left_radius"><a href="/2019/09/18/lnmp/" title="lnmp 环境搭建（基于CentOS7）">     <img class="post_bg" src= "" data-lazy-src="/images/a2ec838e8a4d23751b990b00d52032d347.jpg" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="lnmp 环境搭建（基于CentOS7）"></a></div><div class="recent-post-info"><a class="article-title" href="/2019/09/18/lnmp/" title="lnmp 环境搭建（基于CentOS7）">lnmp 环境搭建（基于CentOS7）</a><div class="article-meta-wrap"><span class="post-meta-date"><i class="far fa-calendar-alt"></i><span class="article-meta-label">发表于</span><time datetime="2019-09-18T03:52:46.000Z" title="发表于 2019-09-18 11:52:46">2019-09-18</time></span><span class="article-meta"><span class="article-meta__separator">|</span><i class="fas fa-inbox"></i><a class="article-meta__categories" href="/categories/Linux/">Linux</a></span></div><div class="content">最近更新：2019年9月28日22:01:06

一键安装包的方式就不作介绍了。本文主要说明如果手动安装配置LNMP。
【安装前准备】1、查看是否已安装 wgetrpm -qa wget如果显示版本，说明已经安装，否则运行命令进行安装 yum install wget。
2、查看是否已安装编译器rpm -qa gcc如果显示版本，说明已经安装，否则运行命令进行安装 yum install gcc gcc-c++。
【安装Nginx】1、安装 nginx 依赖包nginx的Rewrite模块和HTTP核心模块会使用到PCRE正则表达式语法：
yum -y install pcre pcre-devel
nginx的各种模块中需要使用gzip压缩：
yum -y install zlib zlib-devel
安全套接字层密码库：
yum -y install openssl openssl-devel
2、下载nginx包并解压（到/usr/local/src目录中）
cd /usr/local/srcwget http://nginx.org/download/nginx-1.17.3 ...</div></div></div><div class="recent-post-item"><div class="post_cover right_radius"><a href="/2019/09/17/vmware-centos-1/" title="VMWare安装完CentOS 7后，出现 Couldn't resolve host">     <img class="post_bg" src= "" data-lazy-src="/images/a2ec838e8a4d23751b990b00d52032d347.jpg" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="VMWare安装完CentOS 7后，出现 Couldn't resolve host"></a></div><div class="recent-post-info"><a class="article-title" href="/2019/09/17/vmware-centos-1/" title="VMWare安装完CentOS 7后，出现 Couldn't resolve host">VMWare安装完CentOS 7后，出现 Couldn't resolve host</a><div class="article-meta-wrap"><span class="post-meta-date"><i class="far fa-calendar-alt"></i><span class="article-meta-label">发表于</span><time datetime="2019-09-17T13:41:04.000Z" title="发表于 2019-09-17 21:41:04">2019-09-17</time></span><span class="article-meta"><span class="article-meta__separator">|</span><i class="fas fa-inbox"></i><a class="article-meta__categories" href="/categories/Linux/">Linux</a></span></div><div class="content">参考链接：https://blog.csdn.net/qq_31295171/article/details/80875653
yum 时候遇到 Couldn’t resolve host在VMWare 虚拟机上，安装CentOS7 系统进行学习的时候，yum install 安装包时，遇到了 Couldn&#39;t
resolve host 。查询后初步判断是网卡设置原因。解决方式：编辑网卡配置
vi /etc/sysconfig/network-scripts/ifcfg-xxxxx      # 后面的xxxxx 对应各自的网卡

修改文件在后面加上：
DNS1=8.8.8.8DNS2=8.8.4.4ONBOOT=no 修改为 ONBOOT=yes

然后:wq保存退出。输入：service network restart 重启网络。
操作完成，重新执行yum指令就可以正常下载了。
wget 时遇到 Couldn’t resolve hostvi /etc/resolv.conf
如果没有domain localdomain 这一行，就在顶上一行加上。加上后重启服务 servi ...</div></div></div><div class="recent-post-item"><div class="post_cover left_radius"><a href="/2019/09/09/migrate/" title="Hexo 迁移到另外一台电脑 【亲测】">     <img class="post_bg" src= "" data-lazy-src="/images/code.jpg" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="Hexo 迁移到另外一台电脑 【亲测】"></a></div><div class="recent-post-info"><a class="article-title" href="/2019/09/09/migrate/" title="Hexo 迁移到另外一台电脑 【亲测】">Hexo 迁移到另外一台电脑 【亲测】</a><div class="article-meta-wrap"><span class="post-meta-date"><i class="far fa-calendar-alt"></i><span class="article-meta-label">发表于</span><time datetime="2019-09-09T14:31:42.000Z" title="发表于 2019-09-09 22:31:42">2019-09-09</time></span><span class="article-meta"><span class="article-meta__separator">|</span><i class="fas fa-inbox"></i><a class="article-meta__categories" href="/categories/%E5%85%B6%E4%BB%96/">其他</a></span></div><div class="content">最近想到一个问题，一开始 Hexo 是在我的手提电脑上安装，那怎么能在另外的电脑也能正常使用？于是在网上搜了一下，但是在实际操作的时候，发现好几个问题。
1、npm install 的时候，提示某些组件没有安装。这时候需要按照提示缺少的插件进行安装即可。 例如：npm install eslint@^4
2、使用 github 保存时，发现主题文件没有上传。这时候需要把 themes 下的主题目录的 .git .github .gitignore 这几个都删掉，然后 git add -A ,提交即可。
3、hexo 不是内部命令。执行 npm install -g hexo-cli 安装 hexo-cli 即可。
如果有遇到上述问题，希望以上能帮助到你。
</div></div></div><div class="recent-post-item"><div class="post_cover right_radius"><a href="/2019/09/02/redis-basic/" title="Redis基础入门">     <img class="post_bg" src= "" data-lazy-src="/images/redis/redis.jpg" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="Redis基础入门"></a></div><div class="recent-post-info"><a class="article-title" href="/2019/09/02/redis-basic/" title="Redis基础入门">Redis基础入门</a><div class="article-meta-wrap"><span class="post-meta-date"><i class="far fa-calendar-alt"></i><span class="article-meta-label">发表于</span><time datetime="2019-09-02T14:20:12.000Z" title="发表于 2019-09-02 22:20:12">2019-09-02</time></span><span class="article-meta"><span class="article-meta__separator">|</span><i class="fas fa-inbox"></i><a class="article-meta__categories" href="/categories/Redis/">Redis</a></span></div><div class="content">什么是RedisRedis是远程的，基于内存的，非关系型数据库

Redis 应用场景1、缓存缓存数据
2、队列list 实现队列
3、数据存储

Redis 安装1、服务器环境： Linux / Centos 
2、Redis
3、预装 gcc tclyum install gcc-c++
【安装步骤】1、下载 Rediswget http://download.redis.io/releases/redis-5.0.5.tar.gz
2、解压 Redistar -xf redis-5.0.5.tar.gz解压后，进入源码目录，执行 make 命令。安装完后页面：
3、将 src 目录下二进制文件安装到 /usr/local/bin 下。执行命令 sudo make install
4、配置项一般 redis 参考的默认配置文件为解压目录下的 redis.conf ,先把该文件复制到其他目录下，并对其进行配置项修改。
daemonize no //改为yes ,配置redis server 后台进程启动 port 6379 //默认端口 7200 

5、启动 Redis serve ...</div></div></div><div class="recent-post-item"><div class="post_cover left_radius"><a href="/2019/08/30/memcache/" title="Centos 配置 PHP memcached 缓存【踩坑】">     <img class="post_bg" src= "" data-lazy-src="/images/7e3483ec4f7dedd5a30f0e7fee1635b921.png" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="Centos 配置 PHP memcached 缓存【踩坑】"></a></div><div class="recent-post-info"><a class="article-title" href="/2019/08/30/memcache/" title="Centos 配置 PHP memcached 缓存【踩坑】">Centos 配置 PHP memcached 缓存【踩坑】</a><div class="article-meta-wrap"><span class="post-meta-date"><i class="far fa-calendar-alt"></i><span class="article-meta-label">发表于</span><time datetime="2019-08-30T15:10:48.000Z" title="发表于 2019-08-30 23:10:48">2019-08-30</time></span><span class="article-meta"><span class="article-meta__separator">|</span><i class="fas fa-inbox"></i><a class="article-meta__categories" href="/categories/Memcached/">Memcached</a></span></div><div class="content">最近项目中，刚好配置一个新的服务器 memcache 环境。项目中用到 memcache 缓存的时候，需要先在服务器上安装 memcache 环境，以及配置 PHP 的 memcache 拓展。目前接触到使用 memcache 缓存的场景是，多终端登录，前后端分离，设置登录 session 值。
安装教程，可以参考阿里云官方文档。

https://help.aliyun.com/document_detail/48432.html?spm=a2c4g.11186623.6.564.4a1a7cc53z7YxM

注： 如果在生产环境的服务器，记得先做备份。
Centos 及 Aliyun Linux 6系列版本
1、确认是否安装了gcc-c++ 等组件（使用 gcc –v 查看版本是否为4.2及以上）。如没有请执行 yum install gcc+ gcc-c++。
2、执行 rpm -qa | grep php 查看系统中是否有 PHP 环境。如果没有则执行 yum install php-devel,php-common,php-cli 安装包含源码编译的 PHP。
3、检测是否 ...</div></div></div><div class="recent-post-item"><div class="post_cover right_radius"><a href="/2019/08/30/php-basic-1/" title="php常量以及数据类型">     <img class="post_bg" src= "" data-lazy-src="/images/php.png" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="php常量以及数据类型"></a></div><div class="recent-post-info"><a class="article-title" href="/2019/08/30/php-basic-1/" title="php常量以及数据类型">php常量以及数据类型</a><div class="article-meta-wrap"><span class="post-meta-date"><i class="far fa-calendar-alt"></i><span class="article-meta-label">发表于</span><time datetime="2019-08-30T00:45:12.000Z" title="发表于 2019-08-30 08:45:12">2019-08-30</time></span><span class="article-meta"><span class="article-meta__separator">|</span><i class="fas fa-inbox"></i><a class="article-meta__categories" href="/categories/PHP/">PHP</a></span></div><div class="content">PHP字符串定义方式及各自区别【定义方式】单引号双引号
heredoc : &lt;&lt;&lt;EOThello worldEOT


newdoc : 
&lt;&lt;&lt;&#x27;EOT&#x27;hello EricEOT


【区别】
单引号不解析变量，单引号不解析转义字符，只能解析单引号和反斜线本身
双引号解析变量、所有转义符号变量可以使用特殊字符和{}包含
同等情况下，单引号效率更高
heredoc 相当于多行双引号
nowdoc 类似于多行单引号

【数据类型】浮点型
不能运用到比较运算中，会有单双精度的问题。
布尔型
FALSE的多种情况
0,0.0,&#x27;&#x27;,&#x27;0&#x27;,false,array(),NULL

数组类型
超全局数组
$GLOBALS //包含所有$_GET$_POST$_SESSION$_COOKIE$_REQUEST //包含get,post$_SERVER //重点$_FILES$_ENV$_SERVER$_SERVER[&#x27;SERVER_ADDR&#x27;]  // 服务器IP$_SERVER ...</div></div></div><div class="recent-post-item"><div class="post_cover left_radius"><a href="/2019/08/30/php-basic/" title="php引用变量">     <img class="post_bg" src= "" data-lazy-src="/images/php.png" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="php引用变量"></a></div><div class="recent-post-info"><a class="article-title" href="/2019/08/30/php-basic/" title="php引用变量">php引用变量</a><div class="article-meta-wrap"><span class="post-meta-date"><i class="far fa-calendar-alt"></i><span class="article-meta-label">发表于</span><time datetime="2019-08-30T00:12:09.000Z" title="发表于 2019-08-30 08:12:09">2019-08-30</time></span><span class="article-meta"><span class="article-meta__separator">|</span><i class="fas fa-inbox"></i><a class="article-meta__categories" href="/categories/PHP/">PHP</a></span></div><div class="content">【概念】在PHP中使用不同的变量名称，访问同一个内容。
【定义方式】&amp;
【demo】//创建一个包含0-10的数组$a = range(0,10);//创建内存空间var_dump(memory_get_usage());//查看内存使用情况// COW Copy On Write$b = $a;   //$b指向$a 空间$a = range(0,2);//修改a，开辟新空间$b &amp;= $a;  //引用，2个变量永远指向一个空间。更改a内容，并不会开辟新空间


【zval变量容器】
$a = range(0,3);xdebug_debug_zval(&#x27;a&#x27;);//需要安装Xdebug


当变量发生引用时，unset 只会取消引用，并不会销毁空间。
对于对象 obj 来说，本身就是引用传递，不会开辟新空间。
class Person&#123;	public $name = &quot;zhangsan&quot;;&#125;$p1 = new Person();xdebug_debug_zval(&#x27;p1&#x27;);$p2 =  ...</div></div></div><div class="recent-post-item"><div class="post_cover right_radius"><a href="/2019/08/29/apache-hosts/" title="Apache 设置虚拟 hosts">     <img class="post_bg" src= "" data-lazy-src="/images/vhosts/006a0654db05e0ea8d4b8ccc6505491.png" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="Apache 设置虚拟 hosts"></a></div><div class="recent-post-info"><a class="article-title" href="/2019/08/29/apache-hosts/" title="Apache 设置虚拟 hosts">Apache 设置虚拟 hosts</a><div class="article-meta-wrap"><span class="post-meta-date"><i class="far fa-calendar-alt"></i><span class="article-meta-label">发表于</span><time datetime="2019-08-29T15:50:40.000Z" title="发表于 2019-08-29 23:50:40">2019-08-29</time></span><span class="article-meta"><span class="article-meta__separator">|</span><i class="fas fa-inbox"></i><a class="article-meta__categories" href="/categories/%E8%BF%90%E7%BB%B4/">运维</a></span></div><div class="content">前几篇介绍了 Centos 下安装 LAMP 环境，随着服务器上部署的项目越来越多，Apache 也会用到配置 http-vhosts 来实现同一台服务器，部署多个站点的需求。
引入 vhosts 文件1、首先，远程连接服务器后，进入 /etc/httpd/conf 目录下，会看到 httpd.conf 的 APACHE 配置文件。这时候，可以在该文件末尾加上引入文件语句，把需要配置的 vhosts 引入进来。
include conf/extra/httpd-vhosts.conf

配置站点2、extra 目录下的 httpd-vhosts.conf 文件则填写需要配置的 vhosts 站点。
NameVirtualHost *:80&lt;VirtualHost *:80&gt;	ServerName xx.shayvmo.cn	DocumentRoot &quot;/var/www/html/xx&quot;	&lt;Directory &quot;/var/www/html/xx&quot;&gt;	    Options FollowSymLinks	    AllowOv ...</div></div></div><div class="recent-post-item"><div class="post_cover left_radius"><a href="/2019/08/29/cname/" title="如何把 Hexo 博客添加自己的域名">     <img class="post_bg" src= "" data-lazy-src="/images/cname.jpg" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="如何把 Hexo 博客添加自己的域名"></a></div><div class="recent-post-info"><a class="article-title" href="/2019/08/29/cname/" title="如何把 Hexo 博客添加自己的域名">如何把 Hexo 博客添加自己的域名</a><div class="article-meta-wrap"><span class="post-meta-date"><i class="far fa-calendar-alt"></i><span class="article-meta-label">发表于</span><time datetime="2019-08-29T14:29:41.000Z" title="发表于 2019-08-29 22:29:41">2019-08-29</time></span><span class="article-meta"><span class="article-meta__separator">|</span><i class="fas fa-inbox"></i><a class="article-meta__categories" href="/categories/%E5%85%B6%E4%BB%96/">其他</a></span></div><div class="content">使用 Hexo 搭建博客，并发布到 GitHub 上面后，我们可以使用 yourname.github.io 访问搭建好的博客。因为之前买了自己的域名，
所以就想把自己的域名解析到 github 上。看了网上的介绍之后，设置还是比较简单，接下来就是添加域名的过程。
1、首先，进入域名所有服务商的控制台，添加 github 网址的解析，这里不推荐使用 ip 解析，推荐使用 CNAME 方式解析。
2、第二步，进入 github 网站，添加 yourname.github.io.git 仓库的 setting 里面的 Custom domain 为你解析的记录域名。
3、第三步，回到 Hexo 目录下的 source ，添加一个 CNAME 文件，不用加后缀。CNAME 文件内容为 刚刚解析的域名记录。

三步设置完后，等待解析生效，即可使用解析的域名进行访问。
</div></div></div><div class="recent-post-item"><div class="post_cover right_radius"><a href="/2019/08/29/svn/" title="Centos 搭建 svn 服务器">     <img class="post_bg" src= "" data-lazy-src="/images/svn/1.jpg" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="Centos 搭建 svn 服务器"></a></div><div class="recent-post-info"><a class="article-title" href="/2019/08/29/svn/" title="Centos 搭建 svn 服务器">Centos 搭建 svn 服务器</a><div class="article-meta-wrap"><span class="post-meta-date"><i class="far fa-calendar-alt"></i><span class="article-meta-label">发表于</span><time datetime="2019-08-29T06:24:26.000Z" title="发表于 2019-08-29 14:24:26">2019-08-29</time></span><span class="article-meta"><span class="article-meta__separator">|</span><i class="fas fa-inbox"></i><a class="article-meta__categories" href="/categories/%E5%85%B6%E4%BB%96/">其他</a></span></div><div class="content">搭建好服务器之后，免不了需要搭建一个代码的版本控制，这里介绍如何在 Centos 服务器上搭建 svn 版本控制。
1、连接到远程服务器，并搭建 svn 
yum install subversion

安装完成后，会在命令行界面显示Complete！
2、安装好 svn 后，创建一个版本库。我个人比较习惯放在 /opt/ 目录下
mkdir -p /opt/svn/repossvnadmin create /opt/svn/repos


【配置】
创建版本库后，需要修改仓库的权限控制配置。进入到刚刚创建好的仓库目录，conf 目录存放该仓库的配置信息。里面有3个文件，authz,passwd,svnserve.conf
passwd 表示用户的账号，密码authz 表示有哪些用户，对当前仓库的目录访问权限svnserve.conf 表示当前仓库的 svn 配置
（1）先设置passwd，配置多个用户时，以换行的格式区分
[users]# harry = harryssecret# sally = sallyssecrethello=123#用户名=密码


（2）设置authz
[ ...</div></div></div><nav id="pagination"><div class="pagination"><a class="extend prev" rel="prev" href="/page/6/#content-inner"><i class="fas fa-chevron-left fa-fw"></i></a><a class="page-number" href="/">1</a><span class="space">&hellip;</span><a class="page-number" href="/page/6/#content-inner">6</a><span class="page-number current">7</span><a class="page-number" href="/page/8/#content-inner">8</a><a class="extend next" rel="next" href="/page/8/#content-inner"><i class="fas fa-chevron-right fa-fw"></i></a></div></nav></div><div class="aside-content" id="aside-content"><div class="card-widget card-info"><div class="card-info-avatar is-center"><img class="avatar-img" src= "" data-lazy-src="/images/avatar.jpg" onerror="this.onerror=null;this.src='/img/friend_404.gif'" alt="avatar"/><div class="author-info__name">沙屿沫</div><div class="author-info__description">科技始终来源于人性</div></div><div class="card-info-data"><div class="card-info-data-item is-center"><a href="/archives/"><div class="headline">文章</div><div class="length-num">74</div></a></div><div class="card-info-data-item is-center"><a href="/tags/"><div class="headline">标签</div><div class="length-num">42</div></a></div><div class="card-info-data-item is-center"><a href="/categories/"><div class="headline">分类</div><div class="length-num">15</div></a></div></div><a class="button--animated" id="card-info-btn" target="_blank" rel="noopener" href="https://gitee.com/shayvmo"><i class="fab fa-github"></i><span>Follow Me</span></a></div><div class="card-widget card-announcement"><div class="item-headline"><i class="fas fa-bullhorn card-announcement-animation"></i><span>公告</span></div><div class="announcement_content">生活就像海洋，只有意志坚强的人才能到达彼岸。</div></div><div class="sticky_layout"><div class="card-widget card-recent-post"><div class="item-headline"><i class="fas fa-history"></i><span>最新文章</span></div><div class="aside-list"><div class="aside-list-item"><a class="thumbnail" href="/2023/06/05/webman-route-annotation/" title="webman 框架 注解路由插件"><img src= "" data-lazy-src="/images/code.jpg" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="webman 框架 注解路由插件"/></a><div class="content"><a class="title" href="/2023/06/05/webman-route-annotation/" title="webman 框架 注解路由插件">webman 框架 注解路由插件</a><time datetime="2023-06-05T07:04:07.000Z" title="发表于 2023-06-05 15:04:07">2023-06-05</time></div></div><div class="aside-list-item"><a class="thumbnail" href="/2023/05/29/nginx-reload-not-effect/" title="windows服务器重载nginx配置无效"><img src= "" data-lazy-src="/images/code.jpg" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="windows服务器重载nginx配置无效"/></a><div class="content"><a class="title" href="/2023/05/29/nginx-reload-not-effect/" title="windows服务器重载nginx配置无效">windows服务器重载nginx配置无效</a><time datetime="2023-05-29T08:03:45.000Z" title="发表于 2023-05-29 16:03:45">2023-05-29</time></div></div><div class="aside-list-item"><a class="thumbnail" href="/2023/05/24/php-aes/" title="前后端接口传输AES加密"><img src= "" data-lazy-src="/images/code.jpg" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="前后端接口传输AES加密"/></a><div class="content"><a class="title" href="/2023/05/24/php-aes/" title="前后端接口传输AES加密">前后端接口传输AES加密</a><time datetime="2023-05-24T07:00:39.000Z" title="发表于 2023-05-24 15:00:39">2023-05-24</time></div></div><div class="aside-list-item"><a class="thumbnail" href="/2022/08/16/yar-demo/" title="Yar拓展，实现PHP的RPC服务"><img src= "" data-lazy-src="/images/code.jpg" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="Yar拓展，实现PHP的RPC服务"/></a><div class="content"><a class="title" href="/2022/08/16/yar-demo/" title="Yar拓展，实现PHP的RPC服务">Yar拓展，实现PHP的RPC服务</a><time datetime="2022-08-16T09:30:43.000Z" title="发表于 2022-08-16 17:30:43">2022-08-16</time></div></div><div class="aside-list-item"><a class="thumbnail" href="/2022/08/15/my-online-log/" title="线上日志系统"><img src= "" data-lazy-src="/images/code.jpg" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="线上日志系统"/></a><div class="content"><a class="title" href="/2022/08/15/my-online-log/" title="线上日志系统">线上日志系统</a><time datetime="2022-08-15T09:03:01.000Z" title="发表于 2022-08-15 17:03:01">2022-08-15</time></div></div></div></div><div class="card-widget card-categories"><div class="item-headline">
            <i class="fas fa-folder-open"></i>
            <span>分类</span>
            <a class="card-more-btn" href="/categories/" title="查看更多">
    <i class="fas fa-angle-right"></i></a>
            </div>
            <ul class="card-category-list" id="aside-cat-list">
            <li class="card-category-list-item "><a class="card-category-list-link" href="/categories/Go/"><span class="card-category-list-name">Go</span><span class="card-category-list-count">4</span></a></li><li class="card-category-list-item "><a class="card-category-list-link" href="/categories/Hexo/"><span class="card-category-list-name">Hexo</span><span class="card-category-list-count">1</span></a></li><li class="card-category-list-item "><a class="card-category-list-link" href="/categories/Java/"><span class="card-category-list-name">Java</span><span class="card-category-list-count">1</span></a></li><li class="card-category-list-item "><a class="card-category-list-link" href="/categories/Linux/"><span class="card-category-list-name">Linux</span><span class="card-category-list-count">9</span></a></li><li class="card-category-list-item "><a class="card-category-list-link" href="/categories/Memcached/"><span class="card-category-list-name">Memcached</span><span class="card-category-list-count">1</span></a></li><li class="card-category-list-item "><a class="card-category-list-link" href="/categories/MySQL/"><span class="card-category-list-name">MySQL</span><span class="card-category-list-count">3</span></a></li><li class="card-category-list-item "><a class="card-category-list-link" href="/categories/PHP/"><span class="card-category-list-name">PHP</span><span class="card-category-list-count">23</span></a></li><li class="card-category-list-item "><a class="card-category-list-link" href="/categories/Redis/"><span class="card-category-list-name">Redis</span><span class="card-category-list-count">1</span></a></li>
            </ul></div><div class="card-widget card-tags"><div class="item-headline"><i class="fas fa-tags"></i><span>标签</span></div><div class="card-tag-cloud"><a href="/tags/AES/" style="font-size: 1.1em; color: #999">AES</a> <a href="/tags/Apache/" style="font-size: 1.1em; color: #999">Apache</a> <a href="/tags/Curl/" style="font-size: 1.1em; color: #999">Curl</a> <a href="/tags/Go/" style="font-size: 1.37em; color: #99a4b2">Go</a> <a href="/tags/Hexo/" style="font-size: 1.37em; color: #99a4b2">Hexo</a> <a href="/tags/Laravel/" style="font-size: 1.1em; color: #999">Laravel</a> <a href="/tags/Linux/" style="font-size: 1.1em; color: #999">Linux</a> <a href="/tags/MD5/" style="font-size: 1.1em; color: #999">MD5</a> <a href="/tags/MySQL/" style="font-size: 1.37em; color: #99a4b2">MySQL</a> <a href="/tags/Nginx/" style="font-size: 1.23em; color: #999ea6">Nginx</a> <a href="/tags/PHP/" style="font-size: 1.5em; color: #99a9bf">PHP</a> <a href="/tags/Paypal/" style="font-size: 1.1em; color: #999">Paypal</a> <a href="/tags/PhpStorm/" style="font-size: 1.1em; color: #999">PhpStorm</a> <a href="/tags/Python/" style="font-size: 1.1em; color: #999">Python</a> <a href="/tags/RESTfulAPI/" style="font-size: 1.1em; color: #999">RESTfulAPI</a> <a href="/tags/RPC/" style="font-size: 1.1em; color: #999">RPC</a> <a href="/tags/Redis/" style="font-size: 1.1em; color: #999">Redis</a> <a href="/tags/SVN/" style="font-size: 1.1em; color: #999">SVN</a> <a href="/tags/Ubuntu/" style="font-size: 1.37em; color: #99a4b2">Ubuntu</a> <a href="/tags/Vagrant/" style="font-size: 1.23em; color: #999ea6">Vagrant</a> <a href="/tags/Websocket/" style="font-size: 1.1em; color: #999">Websocket</a> <a href="/tags/Yii/" style="font-size: 1.1em; color: #999">Yii</a> <a href="/tags/composer/" style="font-size: 1.1em; color: #999">composer</a> <a href="/tags/element/" style="font-size: 1.23em; color: #999ea6">element</a> <a href="/tags/git/" style="font-size: 1.1em; color: #999">git</a> <a href="/tags/jquery/" style="font-size: 1.1em; color: #999">jquery</a> <a href="/tags/memcached/" style="font-size: 1.1em; color: #999">memcached</a> <a href="/tags/postman/" style="font-size: 1.1em; color: #999">postman</a> <a href="/tags/sitemap/" style="font-size: 1.1em; color: #999">sitemap</a> <a href="/tags/thinkphp6/" style="font-size: 1.1em; color: #999">thinkphp6</a> <a href="/tags/vue/" style="font-size: 1.1em; color: #999">vue</a> <a href="/tags/webhooks/" style="font-size: 1.1em; color: #999">webhooks</a> <a href="/tags/webman/" style="font-size: 1.1em; color: #999">webman</a> <a href="/tags/%E5%85%AC%E4%BC%97%E5%8F%B7%E8%B0%83%E8%AF%95%E5%99%A8/" style="font-size: 1.1em; color: #999">公众号调试器</a> <a href="/tags/%E5%86%92%E6%B3%A1%E6%8E%92%E5%BA%8F/" style="font-size: 1.1em; color: #999">冒泡排序</a> <a href="/tags/%E5%8D%9A%E5%AE%A2%E8%BF%81%E7%A7%BB/" style="font-size: 1.1em; color: #999">博客迁移</a> <a href="/tags/%E5%9B%BE%E7%89%87%E8%BD%ACbase64/" style="font-size: 1.1em; color: #999">图片转base64</a> <a href="/tags/%E5%B7%A5%E5%85%B7/" style="font-size: 1.1em; color: #999">工具</a> <a href="/tags/%E5%B9%82%E7%AD%89/" style="font-size: 1.1em; color: #999">幂等</a> <a href="/tags/%E6%B3%9B%E5%9E%8B/" style="font-size: 1.1em; color: #999">泛型</a></div></div><div class="card-widget card-archives"><div class="item-headline"><i class="fas fa-archive"></i><span>归档</span><a class="card-more-btn" href="/archives/" title="查看更多">
    <i class="fas fa-angle-right"></i></a></div><ul class="card-archive-list"><li class="card-archive-list-item"><a class="card-archive-list-link" href="/archives/2023/06/"><span class="card-archive-list-date">六月 2023</span><span class="card-archive-list-count">1</span></a></li><li class="card-archive-list-item"><a class="card-archive-list-link" href="/archives/2023/05/"><span class="card-archive-list-date">五月 2023</span><span class="card-archive-list-count">2</span></a></li><li class="card-archive-list-item"><a class="card-archive-list-link" href="/archives/2022/08/"><span class="card-archive-list-date">八月 2022</span><span class="card-archive-list-count">4</span></a></li><li class="card-archive-list-item"><a class="card-archive-list-link" href="/archives/2022/06/"><span class="card-archive-list-date">六月 2022</span><span class="card-archive-list-count">1</span></a></li><li class="card-archive-list-item"><a class="card-archive-list-link" href="/archives/2022/05/"><span class="card-archive-list-date">五月 2022</span><span class="card-archive-list-count">2</span></a></li><li class="card-archive-list-item"><a class="card-archive-list-link" href="/archives/2022/01/"><span class="card-archive-list-date">一月 2022</span><span class="card-archive-list-count">6</span></a></li><li class="card-archive-list-item"><a class="card-archive-list-link" href="/archives/2021/09/"><span class="card-archive-list-date">九月 2021</span><span class="card-archive-list-count">2</span></a></li><li class="card-archive-list-item"><a class="card-archive-list-link" href="/archives/2021/08/"><span class="card-archive-list-date">八月 2021</span><span class="card-archive-list-count">1</span></a></li></ul></div><div class="card-widget card-webinfo"><div class="item-headline"><i class="fas fa-chart-line"></i><span>网站资讯</span></div><div class="webinfo"><div class="webinfo-item"><div class="item-name">文章数目 :</div><div class="item-count">74</div></div><div class="webinfo-item"><div class="item-name">已运行时间 :</div><div class="item-count" id="runtimeshow" data-publishDate="2019-08-27T16:00:00.000Z"></div></div><div class="webinfo-item"><div class="item-name">本站总字数 :</div><div class="item-count">30.9k</div></div><div class="webinfo-item"><div class="item-name">本站访客数 :</div><div class="item-count" id="busuanzi_value_site_uv"></div></div><div class="webinfo-item"><div class="item-name">本站总访问量 :</div><div class="item-count" id="busuanzi_value_site_pv"></div></div><div class="webinfo-item"><div class="item-name">最后更新时间 :</div><div class="item-count" id="last-push-date" data-lastPushDate="2023-06-05T09:19:25.031Z"></div></div></div></div></div></div></main><footer id="footer" style="background-image: url('/images/bg/kobe.jpg')"><div id="footer-wrap"><div class="copyright">&copy;2019 - 2023 By 沙屿沫</div><div class="framework-info"><span>框架 </span><a target="_blank" rel="noopener" href="https://hexo.io">Hexo</a><span class="footer-separator">|</span><span>主题 </span><a target="_blank" rel="noopener" href="https://github.com/jerryc127/hexo-theme-butterfly">Butterfly</a></div><div class="footer_custom_text"><a href="http://www.beian.miit.gov.cn/" target="_blank" rel="noopener"><img class="icp-icon" src= "" data-lazy-src="/images/icp.png"><span>粤ICP备18133330号</span></a></div></div></footer></div><div id="rightside"><div id="rightside-config-hide"><button id="darkmode" type="button" title="浅色和深色模式转换"><i class="fas fa-adjust"></i></button><button id="hide-aside-btn" type="button" title="单栏和双栏切换"><i class="fas fa-arrows-alt-h"></i></button></div><div id="rightside-config-show"><button id="rightside_config" type="button" title="设置"><i class="fas fa-cog fa-spin"></i></button><button id="go-up" type="button" title="回到顶部"><i class="fas fa-arrow-up"></i></button></div></div><div id="local-search"><div class="search-dialog"><div class="search-dialog__title" id="local-search-title">本地搜索</div><div id="local-input-panel"><div id="local-search-input"><div class="local-search-box"><input class="local-search-box--input" placeholder="搜索文章" type="text"/></div></div></div><hr/><div id="local-search-results"></div><span class="search-close-button"><i class="fas fa-times"></i></span></div><div id="search-mask"></div></div><div><script src="/js/utils.js"></script><script src="/js/main.js"></script><script src="https://cdn.jsdelivr.net/npm/vanilla-lazyload/dist/lazyload.iife.min.js"></script><script src="/js/search/local-search.js"></script><div class="js-pjax"><script>function subtitleType () {
  if (true) { 
    var typed = new Typed("#subtitle", {
      strings: "生活就像海洋，只有意志坚强的人才能到达彼岸".split(","),
      startDelay: 300,
      typeSpeed: 150,
      loop: true,
      backSpeed: 50
    })
  } else {
    document.getElementById("subtitle").innerHTML = '生'
  }
}

if (true) {
  if (typeof Typed === 'function') {
    subtitleType()
  } else {
    getScript('https://cdn.jsdelivr.net/npm/typed.js/lib/typed.min.js').then(subtitleType)
  }
} else {
  subtitleType()
}</script></div><script defer="defer" id="ribbon" src="https://cdn.jsdelivr.net/npm/butterfly-extsrc@1/dist/canvas-ribbon.min.js" size="150" alpha="0.6" zIndex="-1" mobile="false" data-click="false"></script><script defer="defer" id="fluttering_ribbon" mobile="false" src="https://cdn.jsdelivr.net/npm/butterfly-extsrc@1/dist/canvas-fluttering-ribbon.min.js"></script><script id="click-show-text" src="https://cdn.jsdelivr.net/npm/butterfly-extsrc@1/dist/click-show-text.min.js" data-mobile="false" data-text="富强,民主,文明,和谐,自由,平等,公正,法治,爱国,敬业,诚信,友善" data-fontsize="15px" data-random="false" async="async"></script><script async data-pjax src="//busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js"></script></div></body></html>